/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 涛
 * Date: 2023-10-06
 * Time: 9:11
 */
public class Test1 {
    public static void main(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.createTree();
        //binaryTree.preOrder(root);
        //System.out.println();
        //binaryTree.inOrder(root);
        //System.out.println();
        //binaryTree.postOrder(root);
        System.out.println("子问题思路,节点个数:" + binaryTree.size(root));
        //System.out.println("遍历思路，节点个数：" + binaryTree.size1(root));
        //System.out.println("遍历思路，叶子节点个数：" + binaryTree.getLeafNodeCount1(root));
        System.out.println("子问题思路，叶子节点个数：" + binaryTree.getLeafNodeCount(root));
        System.out.println("第k层的节点个数：" + binaryTree.getKLevelNodeCount(root, 3));
        System.out.println("高度为:" + binaryTree.getHeight(root));
        System.out.println(binaryTree.find(root, 'E'));
    }
}
